package jay.home.bet.domain.logic;

import java.util.List;

import jay.home.bet.dao.AccountDao;
import jay.home.bet.domain.User;

class AccountServiceImpl implements AccountService
{
	private AccountDao accountDao;

	public void deleteUser(User user)
	{
		accountDao.deleteUser(user);
	}

	public User getUser(String username)
	{
		return accountDao.getUser(username);
	}

	public List<User> getAllUsers(int page, int range)
	{
		return (List<User>)accountDao.getAllUsers(page, range);
	}
	
	public List<User> getAliveUsers(int page, int range)
	{
		return accountDao.getAliveUsers(page, range);
	}

	public void insertUser(User user)
	{
		accountDao.insertUser(user);
	}
	
	public void updateUser(User user)
	{
		accountDao.updateUser(user);
	}

	public AccountDao getAccountDao()
	{
		return accountDao;
	}

	public void setAccountDao(AccountDao accountDao)
	{
		this.accountDao = accountDao;
	}
}